home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MIDICraft's MIDINET CD-ROM
/
MIDICraft's MIDINET CD-ROM.iso
/
DOSUTILS
/
MIDIPAT.DOC
< prev
next >
Wrap
Text File
|
1996-11-05
|
8KB
|
211 lines
******************************
MIDIPAT v1.2
midi patch programs and banks
by Guenter Nagler
1995
(gnagler@ihm.tu-graz.ac.at)
******************************
[0] FEATURES
+ reads a binary midi file
+ writes a binary midi file
+ reads program translation table from a text file
+ reads drum translation table from a text file
+ translates GM program changes into optional hbank, lbank and
program select midi commands
+ shows list of GM program names
+ shows list of GM drum names
[1] BACKGROUND
I am using a Korg i3 music workstation and found that some of its non-GM
programs sounds better than the appropriate GM program (e.g. Pianos at
C11,C14 or D11 sounds better than GM Piano at A11). I wished that I could
use one of these sounds than the default instrument.
From other musicians I heard that there are many midi keyboards that
are not GM compatible so that software patches must be used
to play GM midi files as the midi compositor wanted.
For both cases I found a solution in translating the GM programs
into device dependent program selection.
Normal Programs (like Trumpet, Flute ...) can be directed to another
program by given High Bank, Low Bank and the new Program Number.
Drum Programs (like Snare, HiHat,...) are coded as notes in drum channel.
They can be directed by changing note numbers.
The drums program (all drums together) can be treated as a normal program.
[2] FILES DESCRIPTION
MIDIPAT.EXE.........converter program
MIDIPAT.DOC.........this file, showing usage of MIDIPAT.EXE
MIDIIO.HPP...........header file for a c++ midi parser
MIDIIO.CPP...........source code for a c++ midi parser
MIDIPAT.CPP.........c++ source code for midi to text
MIDIPAT.MAK.........make file for project
MIDIPAT.CFG.........compiler options for make
MIDIPAT.PRJ.........compiler project for borland c++ compilers
MIDIPAT.PAT.........program translation table for instruments and drums
only MIDIPAT.EXE is required to run program
a patch file like MIDIPAT.PAT must be available.
[3] COPYRIGHT
MIDIPAT (c) 1995 was created by Guenter Nagler.
MIDIPAT is free and may be used as you wish with this one exception:
You may NOT charge any fee or derive any profit for distribution
of MIDIPAT. Thus, you may NOT sell or bundle MIDIPAT with any
product in a retail environment (shareware disk distribution, CD-ROM,
etc.) without permission of the author.
You may give MIDIPAT to your friends, upload it to a BBS, or ftp it to
another internet site, as long as you don't charge anything for it.
[4] DISCLAIMER
MIDIPAT was designed to handle 100% compatible midi files.
So I give no guarantees of the results, especially with non 100%
compatible midi files.
If you find a midi file that you think to be 100% compatible midi
that is not correctly converted, please send a sample file to
gnagler@ihm.tu-graz.ac.at .
Use MIDIPAT at your own risk. Anything you do with MIDIPAT is your
responsibility, and not the author's. Any damage caused to any person,
computer, software, hardware, company, or business by running MIDIPAT
is your responsibility, and the author will not be liable.
If you don't understand these terms, or are not sure of something, or
are afraid something bad might come of using MIDIPAT, don't use it!
You are here forewarned.
[5] INSTALLATION
[MSDOS]
Simply copy MIDIPAT.EXE in a directory that is in your path.
When you start the program without arguments
[UNIX]
compile sources with your C++ compiler (e.g. GNU Compiler g++):
g++ -o midipat midipat.cpp midiio.cpp
and run program
$ midipat
C:\> MIDIPAT
you should get the usage text (see next section)
[6] USAGE
midipat translates GM programs into device dependent programs
usage: midipat [-P] [-D] [-patch file.pat] [-c #] [-drum #] [-quiet] file.mid patched.m
id
-P show list of GM program names
-D show list of GM drum names
-patch file.pat load patch from file.pat (default is midipat.pat)
-c # modify programs on channel (1-16, default: all channels)
-drum # declare channel(s) # (1-16) as drum channel (default is 10)
-quiet be quiet! does not write percentage info
The parts in brackets [...] are optional.
Option -c can be used more than once to select some channels.
Warning:
Do not expect that MIDIPAT will produce a copy of the original
file if no translations are done! MIDI allows to encode its
commands in different ways without changing the semantic of the
notes (It is allowed to compress the midi file by ommiting
redunant command bytes, but it is no duty).
[8] SUGGESTIONS / COMMENTS / BUG REPORTS / QUESTIONS
WWW: http://hgiicm.tu-graz.ac.at/Cpub
contains all my dos/unix midi programs
EMAIL: gnagler@ihm.tu-graz.ac.at
[9] TRANSLATION TABLE
Modify midipat.pat or modify a copy of it (if you are using alternative
translation tables).
Semicolons are used for comments that stop at end of current line.
this not ; but this is a comment
Numbers can be entered decimal or hexadezimal
62 ; this is a decimal value
$3e ; this is a hexadecimal value that has same value as decimal 62
Normal program translations are defined by 4 entries in one line that
are seperated by whitespace(s) or tab(s):
Programname HighBank LowBank ProgramNumber
Drums $3e 2 $1a ; Use Dr7
Piano 0 1 $40 ; Use Piano 8'
P2 - - - ; program 2 remains 2
Marcato 0 1 $42 ; Use i3 Strings
Drums is a special program name that is used to change the whole drum set
at once (e.g Dr7 drum set on i3 is DanceKit drum set).
You get the Programnames by the command "midipat -P" or use
Program numbers P0-P127 instead of names.
Have a look into your audiocard/keyboard manual which banks and
program numbers switch to your instruments. If HighBank or LowBank
is not necessary then mark the position with minus (-). If the program
number is marked with - the GM program number of the instrument is used.
Drum translations need two entries in one line (seperated by spaces or tabs):
GMDrum NewDrum
Dr28 E1 ; RockKick E1
Dr29 Snare3 ; Snare3 F1
Dr30 - ; remains Dr30
Both Values can be entered in three formats:
Name: You get a list of drum names by command "midipat -D"
Number: Dr0-Dr127 (but only Dr28-Dr87 are defined by GM)
Note: Each drum represents a note in drum keyboard
Cx C#x D#x Ex Fx F#x Gx G#x Ax A#x Bx
where x=0-9 (e.g. C#2)
Send me your design of a translation table for special hardware
(need name of hardware) if you want that I add it to the WWW page
(near midipat program)
[10] USE
I use MIDIPAT in a dos batch file MIDI.BAT that produces temporary
midi file that is played with my dos sound player:
@echo off
midipat -patch myi3.pat %i temp.mid
playmidi temp.mid
del temp.mid
example: show a list of program names
midipat -P | more
example: show a list of drum names
midipat -D | more
example: translate an extended midi file using midipat.pat in current directory
midipat -isdrum 16 original.mid patched.mid
example: convert MT-32 midi to General Midi
midipat -patch mt2gm.pat mt32file.mid gmfile.mid
[11] CHANGES
v1.0 to v1.1:
* using MidiCopy instead of MidiRead to simplify converter
* added mt2gm.pat (convert from MT-32 midi to GM midi)
v1.1 to v1.2:
* added option -c to affect only certain channel(s)
this option can be used more than once in command line